/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package client;

import com.jme3.network.HostedConnection;
import com.jme3.renderer.RenderManager;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.Spatial;
import com.jme3.scene.control.AbstractControl;
import com.jme3.scene.control.Control;

/**
 *
 * @author Ben
 */
public class ControlNetplayer extends AbstractControl
{
    HostedConnection player;
    public ControlNetplayer()
    {
        
    }
    public ControlNetplayer(HostedConnection c)
    {
        player = c;
    }
    @Override
    protected void controlUpdate(float tpf)
    {
        Main.network.sendMove(this.getSpatial().getLocalTranslation(), player.getId());
    }

    @Override
    protected void controlRender(RenderManager rm, ViewPort vp)
    {
        
    }

    public Control cloneForSpatial(Spatial spatial)
    {
        return null;
    }
    
}
